home *** CD-ROM | disk | FTP | other *** search
/ Ray Dream Studio / Ray Dream Studio (CDRAYD1) (Ray Dream) (1995).iso / DREAMSDK.WIN / INCLUDE / I3DEX.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-01  |  4.0 KB  |  95 lines  |  [TEXT/mdos]

  1. /* $Id: i3dex.h 1.1 1995/06/27 15:07:57 YannPC Exp $ */
  2. /*****************************************************************************\
  3. *                                                                             *
  4. * I3DEx.h                                                                                    *
  5. *   I3DExtension definition                                                   *
  6. *   I3DExDataExchanger definition                                             *
  7. *                                                                             *
  8. *           Copyright (c) 1995, Ray Dream, Inc. All rights reserved.          *
  9. *                                                                             *
  10. \*****************************************************************************/
  11.  
  12. #ifndef __I3DEX__
  13. #define __I3DEX__
  14.  
  15. #ifndef __3DCOTYPE__
  16. #include "3DCoType.h"
  17. #endif
  18.  
  19. struct IShUtilities;
  20.  
  21. //****** Globally Unique Ids **************************************************
  22.  
  23. DEFINE_GUID(IID_I3DExtension, 0xB0210D00L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
  24. DEFINE_GUID(IID_I3DExDataExchanger, 0xB295B680L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
  25.  
  26.  
  27. /*****************************************************************************\
  28. *  I3DExtension                                                               *
  29. *                                                                             *
  30. *  Contains utility methods that are complements to IUnkown, like Clone()     *
  31. *                                                                             *
  32. *                                                                             *
  33. \*****************************************************************************/
  34.  
  35. #undef  INTERFACE
  36. #define INTERFACE   I3DExtension
  37.  
  38. DECLARE_INTERFACE_(I3DExtension, IUnknown) {
  39.     // IUnknown methods
  40.   STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  41.   STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  42.   STDMETHOD_(ULONG, Release) (THIS) PURE;
  43.  
  44.     // I3DExtension methods
  45.     STDMETHOD(ShellUtilitiesInit) (THIS_ IShUtilities* shellUtilities) PURE;
  46.     STDMETHOD_(I3DExtension*, Clone) (THIS) PURE;
  47.     };
  48.  
  49.  
  50. /*****************************************************************************\
  51. *  I3DExDataExchanger                                                         *
  52. *                                                                             *
  53. *  Allows the Shell to handle the UI of the 3D Component and the              *
  54. *  Component's public data.                                                   *
  55. *  Handles the communication between the 3D Component and the Shell           *
  56. *                                                                             *
  57. *  All other I3DEx... interfaces inherit from this one                        *
  58. *                                                                             *
  59. \*****************************************************************************/
  60.  
  61. typedef struct ExtensionData {
  62.     ULONG        fType;
  63.     ULONG        fID;
  64.     } ExtensionData;
  65.  
  66. typedef struct ExtensionDataMap {
  67.     short                    fNbExtensionData;            // Number of ExtensionData
  68.     ExtensionData    fExtensionData[1];        // Array with fNbExtensionData entries
  69.     } ExtensionDataMap;
  70.  
  71.  
  72. #undef  INTERFACE
  73. #define INTERFACE   I3DExDataExchanger
  74.  
  75. DECLARE_INTERFACE_(I3DExDataExchanger, I3DExtension) {
  76.     // IUnknown methods
  77.   STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  78.   STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  79.   STDMETHOD_(ULONG, Release) (THIS) PURE;
  80.   
  81.     // I3DExtension methods
  82.     STDMETHOD_(I3DExtension*, Clone) (THIS) PURE;
  83.     STDMETHOD(ShellUtilitiesInit) (THIS_ IShUtilities* shellUtilities) PURE;
  84.  
  85.   // I3DExDataExchanger methods
  86.     STDMETHOD_(ExtensionDataMap*, GetExtensionDataMap) (THIS) PURE;    // Return NULL if GetResID is to be used
  87.     STDMETHOD_(void*, GetExtensionDataBuffer) (THIS) PURE;
  88.   STDMETHOD(ExtensionDataChanged) (THIS) PURE;
  89.   STDMETHOD(HandleEvent) (THIS_ ULONG sourceID) PURE;
  90.     STDMETHOD_(short, GetResID) (THIS) PURE;
  91.     };
  92.  
  93. #endif
  94.  
  95.